package com.trainoo.payment.mock.message;

import java.io.Serializable;

/**
 * <p> add description here </p>
 *
 * @author tao.zhou
 * @version 1.0
 * @date 2021/12/1 20:07:00
 */
public class BaseResult<T> implements Serializable {

    private static final long serialVersionUID = 1L;
    private static final int SUCCESS_CODE = 0;

    private int code;
    private String msg;
    private T data;

    public BaseResult(T data) {
        this.code = SUCCESS_CODE;
        this.msg = "SUCCESS";
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
